/**   
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-06-28 02:01:43  
 * Copyright (c) 2015- -版权所有     
 */

package com.joysuch.wwyt.audit.service;

import java.util.List;

import com.joysuch.wwyt.audit.bean.AuditLogActionDefDetailBean;
import com.joysuch.wwyt.audit.bean.AuditLogActionDefEditBean;
import com.joysuch.wwyt.audit.bean.AuditLogActionDefListBean;
import com.joysuch.wwyt.audit.bean.AuditLogActionDefListBean.SearchAuditLogActionDef;
import com.joysuch.wwyt.audit.entity.AuditLogActionDef;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface AuditLogActionDefService {

    public AuditLogActionDef add(AuditLogActionDefEditBean entity);

    void update(AuditLogActionDefEditBean entity);

    Page<AuditLogActionDefListBean> findByPage(Pageable page, SearchAuditLogActionDef condition);

    void delete(Long id) throws BusinessRestrictionsException;

    AuditLogActionDefDetailBean getById(Long id);

    AuditLogActionDef findById(Long id);

    /**
     * 加载全部审计日志定义，并缓存
     * 
     * @return
     */
    List<AuditLogActionDef> loadAll();

    /**
     * 重新加载审计日志定义
     */
    void reload();

    /**
     * 根据触发类型及值，查找审计日志定义
     * 
     * @param triggerType
     *            触发类型
     * @param value
     *            触发值
     * @return
     */
    AuditLogActionDef findOneByTriggerTypeAndValue(String triggerType, String value);

}
